clear all

********************************************************************************
********************************************************************************
**** When Can We Trust Regression Discontinuity Design Estimates from Close ****
*************** Elections? Evidence from Experimental Benchmarks ***************
********************************************************************************
********************************************************************************

* This file produces the numbers in Table OA15 in Online Appendix D of De Magalhaes
* et al. (Political Analysis).

cd "$dir"
use "$dir/data/personal_incumbency_advantage.dta", clear

********************************************************************************

levelsof country, local(election)
foreach x of local election {
	rddensity rv if country=="`x'" & rv!=. & rv!=0, all c(0) bwselect(sum) h(1)
}
